define(["app.require"], function(module){
	return module
		.run([
			'$rootScope',
			'$state',
			'$stateParams',
			function ($rootScope, $state, $stateParams) {
				$rootScope.$state = $state;
				$rootScope.$stateParams = $stateParams
			}
		 ])
		.config(function($stateProvider, $urlRouterProvider) {
		$stateProvider	 
		.state('home',{
			//abstract: true,
			url:'/home',
			views: {
				'main@': {
					templateUrl: '../views/require.home.main.html',
					controller: "homeController"
				},
				'main.type@': {
					templateUrl: '../views/require.home.main.type.html',
					controller: "homeController"
				}
			}
		})     
		// route to show our basic form (/form)
		.state('form', {
			url: "/form",
			template: "This is info {{info}}." 
				+ "<a href='javascript:void(0);' ui-sref=\"home\">trun to home</a>",
			controller: 'formController'
		})

		$urlRouterProvider.otherwise('/home');
	});	
});